import Vue from 'vue'
import VueRouter from 'vue-router'
import AskInfo from '@/views/AskInfo'
import FindHouse from '@/views/FindHouse'
import MyIndex from '@/views/MyIndex'
import MySelf from '@/views/MySelf'
import ShouYe from '@/views/ShouYe'
import HkLogin from '@/views/HkLogin'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/login'
    }, {
      path: '/login',
      component: HkLogin
    },
    {
      path: '/shouye',
      component: ShouYe,
      children: [
        {
          path: '/shouye/index',
          component: MyIndex
        },
        {
          path: '/shouye/find',
          component: FindHouse
        }, {
          path: '/shouye/ask',
          component: AskInfo
        }, {
          path: '/shouye/my',
          component: MySelf
        }
      ]
    }
  ]
})

export default router
